package com.dmgn.util;

import java.io.File;

import org.apache.struts2.ServletActionContext;

public class UploadFile {
	
	public String upload(File file,String fileName)
	{
		String dataDir = ServletActionContext.getServletContext().getRealPath("/document");
		File saveFile = new File(dataDir, fileName);
		file.renameTo(saveFile); 
		return dataDir+fileName;
	}
}
